﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Views/Shared/Site.Master" Inherits="System.Web.Mvc.ViewPage<Procenge.PortalVendas.Models.Produto>" %>

<%@ Import Namespace="Procenge.PortalVendas.Models" %>
<asp:Content ID="Content1" ContentPlaceHolderID="TitleContent" runat="server">
    Cadastro de Produto
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="server">
    <form id="form1" runat="server">
    <h2>
        Cadastro de Produto</h2>
    <% using (Html.BeginForm())
       {%>
    <%: Html.ValidationSummary(true) %>
    <fieldset>
        <legend>Informações</legend>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.cod) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.cod) %>
            <%: Html.ValidationMessageFor(model => model.cod) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.nome) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.nome) %>
            <%: Html.ValidationMessageFor(model => model.nome) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.fornecedor_cnpj) %>
        </div>
        <div class="editor-field">
        <%: Html.DropDownListFor(m => m.fornecedor_cnpj, (ViewData["mf"] as SelectList)) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.qtd) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.qtd) %>
            <%: Html.ValidationMessageFor(model => model.qtd) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.descricao) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.descricao) %>
            <%: Html.ValidationMessageFor(model => model.descricao) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.secao) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.secao) %>
            <%: Html.ValidationMessageFor(model => model.secao) %>
        </div>
        <div class="editor-label">
            <%: Html.LabelFor(model => model.preco) %>
        </div>
        <div class="editor-field">
            <%: Html.TextBoxFor(model => model.preco) %>
            <%: Html.ValidationMessageFor(model => model.preco) %>
        </div>
        <p>
            <input type="submit" value="Create" />
        </p>
    </fieldset>
    <% } %>
    <div>
        <%: Html.ActionLink("Voltar a Lista", "Index") %>
    </div>
    </form>
</asp:Content>
